##  设置支持的选择器，基于JQuery选择器
##
from selenium.webdriver.common.by import By


class Selector(object):
    """
    Set of supported locator strategies.
    """

    ID = "id"
    XPATH = "xpath"
    CLASS_NAME = "class name"
    CSS_SELECTOR = "css selector"
    LINK_TEXT = "link text"
    NAME = "name"

    SETS = [ID, XPATH, CLASS_NAME, CSS_SELECTOR, LINK_TEXT, NAME]

    MAP = {ID: By.ID,
          XPATH: By.XPATH,
          CLASS_NAME:By.CLASS_NAME,
          CSS_SELECTOR: By.CSS_SELECTOR,
          LINK_TEXT: By.LINK_TEXT,
          NAME: By.NAME}
